not-found.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. "use client";
  2. import Link from "next/link";
  3. import { useLocale, useT } from "@/components/locale-provider";
  4. import { localePath } from "@/lib/i18n";
  5. // Not-found pages get no params; the language comes from the layout's provider.
  6. export default function NotFound() {
  7. const lang = useLocale();
  8. const { notFound: t, common } = useT();
  9. return (
  10. <div className="flex min-h-[60vh] flex-col items-center justify-center gap-5 px-4 text-center">
  11. <p className="eyebrow">{t.eyebrow}</p>
  12. <h1 className="font-display text-[clamp(4rem,14vw,8rem)] leading-none font-semibold tracking-[-0.03em]">
  13. {t.title}
  14. <span className="text-glacier">{common.period}</span>
  15. </h1>
  16. <p className="max-w-[40ch] text-[15px] text-pretty text-ink-2">
  17. {t.body}
  18. </p>
  19. <Link
  20. className="lg mt-2 inline-flex h-10 items-center rounded-full px-5 text-sm font-medium"
  21. href={localePath(lang, "/")}
  22. >
  23. <span aria-hidden className="lg-caustic" />
  24. <span>{t.home}</span>
  25. </Link>
  26. </div>
  27. );
  28. }